-- GENERATED SPELL FOR [Doomsayer Jurim] --


function spell0_18686(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(39212,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18686', 26000, 1)
end

function spell1_18686(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(12493,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18686', 570, 1)
end

function spell2_18686(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(39210,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18686', 5500, 1)
end

function spell3_18686(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(38401,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18686', 2500, 1)
end

function spell4_18686(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18686', 3000, 1)
end

function Sorts_18686(pUnit, Event)
local choix_sorts_18686 = math.random(0, 4)
if choix_sorts_18686 == 0 then
pUnit:RegisterEvent('spell0_18686', 1, 1)
end
if choix_sorts_18686 == 1 then
pUnit:RegisterEvent('spell1_18686', 1, 1)
end
if choix_sorts_18686 == 2 then
pUnit:RegisterEvent('spell2_18686', 1, 1)
end
if choix_sorts_18686 == 3 then
pUnit:RegisterEvent('spell3_18686', 1, 1)
end
if choix_sorts_18686 == 4 then
pUnit:RegisterEvent('spell4_18686', 1, 1)
end
end

function mob18686_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18686', math.random(1500, 3000), 1)
end

function mob18686_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18686_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18686_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18686, 1, 'mob18686_Action')
RegisterUnitEvent(18686, 2, 'mob18686_Leave')
RegisterUnitEvent(18686, 3, 'mob18686_Kill')
RegisterUnitEvent(18686, 4, 'mob18686_Die')
